<?php 
$sql = "SELECT
			  c.category_id,
			  d.Name,
			  d.meta_description,
			  d.description,
			  d.meta_key
		  FROM
			  category AS c,
			  category_description AS d
		  WHERE
				c.category_id = d.category_id
				AND
				d.lang_id = '".$_SESSION['lang_id']."'
				AND
				c.sef_url = '".$sef_url."' 
			
		  ";
$result = query($sql);
$row_cat = mysql_fetch_object($result);


head(sth($row_cat->Name),sth($row_cat->meta_description),sth($row_cat->meta_key));

?>

<div id="wrap">

	<div id="topicons">
		<a class="icon home" href="<?=HTML_BASE?>"><span><?=__HOME?></span></a>
		<a class="icon about" href="<?=HTML_BASE.$_SESSION['lang']?>/about"><span><?=__ABOUT?></span></a>
        
        <?php 
		$sql =	"SELECT
				  c.album_id,
				  c.order_number,
				  c.published,
				  c.sef_url,
				 
				  d.title	
			  FROM
				  album AS c,
				  album_description AS d,
				  album_to_category AS r
			  WHERE
			  
				  c.album_id = d.album_id
				  AND
				  d.lang_id = '".$_SESSION['lang_id']."'
				  AND
				  c.album_id = r.album_id
				  AND
				  category_id = '".$row_cat->category_id."'
				  AND
				  c.published
				  
				  ORDER BY  c.order_number DESC
				";
		$result = query($sql);
	
		while ($row = mysql_fetch_object($result)) {
	?>
	   	<a href="<?=HTML_BASE.$_SESSION['lang']?>/<?=$sef_url?>/<?=$row->sef_url?>" class="photoicon"><span><?=$row->title?></span></a>
        
    <?php }?>
		
		
	</div>
	<div id="lefticons">
		
		<a class="icon price" href="<?=HTML_BASE.$_SESSION['lang']?>/prices#<?=$_GET['prm1']?>"><span><?=__PRICE_PHOTO?></span></a>
		<a class="icon contacts" href="<?=HTML_BASE.$_SESSION['lang']?>/contacts"><span><?=__CONTACTS?></span></a>
        
        <a class="icon fearless" href="http://www.fearlessphotographers.com/"><span><?=__MEMBER_OF?></span></a>
	</div>
    
    
	
	<div id="pagecontent">

			
				
			
			<div id="contenttextfull">
				 <?=stripslashes($row_cat->description)?>
			</div>
			
			
	
		</div>

   
	
<?php

foot();
?>